<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>04_文字溢出替换为省略号</title>
    <style>
        div{
            width: 200px;
            background-color: #ff0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
<div title="Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur, dolorem dolores ea eius excepturi fuga illum
    ipsa, non omnis, quidem reprehenderit saepe. Animi ipsum laboriosam porro reiciendis repudiandae temporibus vitae!">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequuntur, dolorem dolores ea eius excepturi fuga illum
    ipsa, non omnis, quidem reprehenderit saepe. Animi ipsum laboriosam porro reiciendis repudiandae temporibus vitae!
</div>
</body>
</html>